package com.jie.other.compose.study04

import com.jie.other.compose.data.ExploreModel

public class Study04Repository(private val localRepository: Study04LocalRepository = Study04LocalRepository) {

    val destinations: List<ExploreModel> = localRepository.craneDestinations
    val hotels: List<ExploreModel> = localRepository.craneHotels
    val restaurants: List<ExploreModel> = localRepository.craneRestaurants

    fun getDestination(cityName: String): ExploreModel? {
        return localRepository.craneDestinations.firstOrNull {
            it.city.name == cityName
        }
    }

}